package com.bt.mes.brm.web.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bt.mes.query.api.service.IXpinqshtService;
import com.bt.mes.brm.api.service.IXpbisdeptService;
import com.bt.mes.brm.api.service.IXpbisopeService;
import com.bt.mes.brm.api.service.IXpbispathService;
import com.bt.mes.brm.api.service.IXpbistoolService;
import com.bt.mes.brm.api.service.IXplstdatService;
import com.bt.mes.brm.web.service.ISendMessageService;

@Service
public class SendMessageServiceImpl implements ISendMessageService{
	@Resource
	private IXpbispathService xpbispathService;
	
	@Resource
	private IXpbisopeService xpbisopeService;
	
	@Resource
	private IXpbistoolService xpbistoolService;
	
	@Resource
	private IXplstdatService xplstdatService;
	
	public String sendMesage(String trxId,String inTrx) {
		String outTrx = null;
		if("XPBISPTH".equals(trxId)){
			outTrx = xpbispathService.subMainProc(inTrx);
		}else if("XPBISOPE".equals(trxId)){
			outTrx = xpbisopeService.subMainProc(inTrx);
		}else if("XPBISTOL".equals(trxId)){
			outTrx = xpbistoolService.subMainProc(inTrx);
		}else if("XPLSTDAT".equals(trxId)){
			outTrx = xplstdatService.subMainProc(inTrx);
		}
		return outTrx;
	}

}
